package com.yzc.android.beans;

import android.os.Parcel;

import java.util.List;

import com.yzc.android.manager.UpgradeManager;

/**
 * Created by yzc on 15/9/18.
 */
public class UpgradeVersionBean implements android.os.Parcelable {
    public int is_force;
    public String forbiddenVersion;
    public String packageUrl;
    public String latestVersion;
    public List<String> desc;

    public int up_status = UpgradeManager.kDontUpgrade;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.is_force);
        dest.writeString(this.forbiddenVersion);
        dest.writeString(this.packageUrl);
        dest.writeString(this.latestVersion);
        dest.writeStringList(this.desc);
        dest.writeInt(this.up_status);
    }

    public UpgradeVersionBean() {
    }

    protected UpgradeVersionBean(Parcel in) {
        this.is_force = in.readInt();
        this.forbiddenVersion = in.readString();
        this.packageUrl = in.readString();
        this.latestVersion = in.readString();
        this.desc = in.createStringArrayList();
        this.up_status = in.readInt();
    }

    public static final Creator<UpgradeVersionBean> CREATOR = new Creator<UpgradeVersionBean>() {
        @Override
        public UpgradeVersionBean createFromParcel(Parcel source) {
            return new UpgradeVersionBean(source);
        }

        @Override
        public UpgradeVersionBean[] newArray(int size) {
            return new UpgradeVersionBean[size];
        }
    };
}
